﻿#include <iostream>
#include<initializer_list>
using namespace std;

template<class...Args>
void printAll(Args...args)
{
    initializer_list<int> il={((cout<<args<<" "),1)...};
    for(int val:il)
        cout<<val<<" ";
    cout<<endl;
}

class a
{
public:
    a(initializer_list<int> il)
    {
        for(int val:il)
            cout<<val<<" ";
        cout<<endl;
    }
};

int main()
{
    printAll(1,2,3,4,5,6,7,8);
//    a({1,2,3,4,5,6,7,8});
    return 0;
}
